<winclose> : Close Window

This command closes specified window.  If the specified window is main application window this command causes the application is closed.  (If an application cannot be exited this way it is also possible to use <process_kill> command).

Syntax: 

<winclose>("WinTitleOrHWND", Match)

WinTitleOrHWND
Title of the window to activate or HWND.

Match
Takes effect only if a window title is used as WinTitleOrHWND parameter. Can be one of these values:
0 - WinTitle can be substring of a window title
1 - WinTitle must exactly match a window title 

Example: 

<#> This macro closes "Notepad" window
<#>
<cmds>

<if_win>("Notepad","OPEN",0)
   <winclose>("Notepad",0)
<else>
   <msg>(100,100,"'Notepad' is not opened!","Message",1)
<endif>